/**
 * Created by smp on 2017/3/16.
 */
//表单提交
$('#dictionaryTypeSave').on('click',function () {

    layer.confirm('是否确定保存？', {
        btn: ['确定','取消'] //按钮
    }, function(){
        $.ajax({
            type: "POST",
            url: ROOT_PATH+'/permission/dictionaryType/editDictionaryType.shtml',
            data: $("#dictionaryTypeForm").serialize(),
            dataType: "json",
            success: function(result){
                //result = $.parseJSON(result);
                if (result.success){
                    //$.messager.progress('close');	// 如果提交成功则隐藏进度条
                    parent.layer.msg(result.message,{time:1000,icon:1},function () {
                        parent.$('#dictionaryTypeList').datagrid('load');
                        parent.layer.closeAll(); //先得到当前iframe层的索引
                    });
                }else {
                    //$.messager.progress('close');	// 如果提交成功则隐藏进度条
                    parent.layer.msg(result.message,{time:1000,icon:2});
                }
            }
        });
    });

});
//参数清空
$('#dictionaryTypeReset').on('click',function () {
    $('#dictionaryTypeForm').form('reset');
});
